home *** CD-ROM | disk | FTP | other *** search
- ( If you want to use UniForth with the PortFolio, I'd recommend)
- ( forgetting the block editor and using the PortFolio's native text)
- ( editor. Here is an example:)
-
- ( create a text file, call it TABLE.TXT, that contains the)
- ( following two lines-)
-
- : TABLE CR 5 1 DO 5 1 DO I J * 4 .R LOOP CR LOOP ;
- ;S
-
- ( the word TABLE will print a simple multiplication table when)
- ( executed in UniForth. BE SURE TO END THE ACTUAL PROGRAM CODE)
- ( WITH A ";S" ON A LINE BY ITSELF, AND TO SET OFF ALL COMMENTS WITH)
- ( PARENTHESIS AS I'VE DONE IN THIS FILE. Be sure to leave a space)
- ( between the 1st parenthesis and the start of the comment.)
-
- ( Now start Uniforth by typing Uniforth. You'll get a message)
- ( that UniForth can't find it's default INIT file, but don't worry)
- ( about it. To load in the source code file TABLE.TXT type:)
-
- ( OPEN TABLE.TXT ) ( open the file)
- ( FLOAD ) ( load the file)
-
- ( --you should see Forth respond with an "ok". Now you can type)
- ( the word TABLE and see a multiplication table appear on the)
- ( screen. You can also type WORDS to see all the words in the)
- ( dictionary. TABLE should be the first one.)
-
- ( An even faster way to load your source file into UniForth is to)
- ( specify it on the DOS command line when you start UniForth.)_
- ( Type:)
-
- ( UNIFORTH TABLE.TXT)
-
- ( then after Forth loads and gives you an "ok", type:)
-
- ( FLOAD)
-
- ( to load the file. You can automate the edit/compile cycle by)
- ( writing a batch file to automatically start Uniforth with a common)
- ( source file, perhaps "UNIFORTH SOURCE.TXT". Do all of your source)
- ( code editing in the SOURCE.TXT file, then copy it to another name)
- ( for safekeeping when through programming. )
-
- ( Another way to speed the edit/compile sequence is to use a small)
- ( text editor like VDE, available on this forum as VDE140.ARC.)
- ( You can edit a source code file, save it, temporarily run a DOS)
- ( command like "UNIFORTH SOURCE.TXT", type FLOAD in Forth and run)
- ( your program. If any error occurs while loading, UniForth will)
- ( tell you where and show you the offending line. Then typing)
- ( "BYE" will drop you back into the editor again. Sophisticated)
- ( editors like VDE also allow you to set up macros, so you could)
- ( automate the whole sequence and tie it to a unique key)
- ( combination.)
-
- ( Have fun with UniForth. I've been unable to locate the firm)
- ( which produced it, so if you really get into Forth programming I'd)
- ( recommend a commercial product like LMI's PC Forth. You can)
- ( contact LMI at 213-306-7412, or through their BBS at 213-306-3530,)
- ( or via CompuServe Email at LMI 72406,1577. <STS>)